Skip to content

feat(logs): add logs when closing tickets#264

Merged
Akinator31 merged 1 commit intomainfrom
262-logs-tickets-channel
Nov 28, 2025
Merged

feat(logs): add logs when closing tickets#264
Akinator31 merged 1 commit intomainfrom
262-logs-tickets-channel

Conversation

@Akinator31
Copy link
Copy Markdown
Member

This pull request adds a new feature to log ticket closures in a dedicated logs channel, with contextual information and a link to the ticket panel, across both manual and scheduled closure flows. The change is implemented for close and force-close commands (both slash and text), as well as scheduled closure operations. It also introduces localized log messages in English and French.

Logging and Notification Enhancements

  • Added logic to send a log message to a configured logs channel whenever a ticket is closed (manual, force, or scheduled), including the user's name, user ID, and a direct link to the ticket panel. This is conditional on the enable_logs config setting and presence of a logs channel ID. (rustmail/src/commands/close/slash_command/close.rs, rustmail/src/commands/close/text_command/close.rs, rustmail/src/commands/force_close/slash_command/force_close.rs, rustmail/src/commands/force_close/text_command/force_close.rs, rustmail/src/modules/scheduled_closures.rs)

  • Ensured that log messages are sent in both English and French, with appropriate translations for the ticket closure log entry. (rustmail/src/i18n/language/en.rs, rustmail/src/i18n/language/fr.rs)

Codebase Maintenance

  • Added necessary imports for utility functions used in the new logging logic. (rustmail/src/commands/force_close/slash_command/force_close.rs, rustmail/src/commands/force_close/text_command/force_close.rs)

@Akinator31 Akinator31 self-assigned this Nov 28, 2025
@Akinator31 Akinator31 linked an issue Nov 28, 2025 that may be closed by this pull request
@Akinator31 Akinator31 merged commit dc982b6 into main Nov 28, 2025
6 checks passed
@Akinator31 Akinator31 deleted the 262-logs-tickets-channel branch November 28, 2025 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Logs tickets channel

1 participant